package acm;

import java.io.InputStreamReader;
import java.util.Scanner;

public class Test1409 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(new InputStreamReader(System.in));
        int[] arr=new int[sc.nextInt()*2];
        for (int i = 0; i < arr.length; i++) {
            arr[i]=sc.nextInt();
        }
        sc.nextInt();
        int l=0,r=arr.length-1;
        int leftSum=0,rightSum=0;
        int res=0;
        while (l<arr.length&&r>=0){
            leftSum+=arr[l++];
            rightSum+=arr[r--];
            res+=leftSum==rightSum?1:0;
        }
        System.out.println(res);
    }
    public static int fun(int[] arr){
        int l=0,r=arr.length-1;
        int leftSum=0,rightSum=0;
        int res=0;
        while (l<arr.length&&r>=0){
            leftSum+=arr[l++];
            rightSum+=arr[r--];
            res+=leftSum==rightSum?1:0;
        }
        return res;
    }
}
